package com.qfjy.controller;

import com.qfjy.service.DemoService;
import com.qfjy.util.result.ResultCode;
import com.qfjy.util.result.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController {

    @Autowired
    private DemoService demoService;

    @GetMapping("list")
    @ResponseBody
    public Object list(){
        return new ResultJson<>(demoService.selectList(), ResultCode.SUCCESS);
    }
}
